<?xml version="1.0" encoding="windows-1252"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:composite="http://java.sun.com/jsf/composite">
<!-- INTERFACE -->
    <composite:interface>
        <composite:actionSource name="addButton" targets="form:addButton"/>
        <composite:attribute name="addButtonText" default="Add airplane" required="true"/>
        <composite:attribute name="headerPrompt"/>
        <composite:attribute name="textPrompt"/>
        <composite:attribute name="namePrompt"/>
        <composite:attribute name="managedBean"/>
    </composite:interface>

    <!-- IMPLEMENTATION, the cc's below are predefined-->
    <composite:implementation>
       <h:form id="form" prependId="false"
                onsubmit="return checkForm(this, '#{cc.clientId}')">
            <h1>#{cc.attrs.headerPrompt}</h1>
            <div class="prompt">
                #{cc.attrs.textPrompt}
            </div>
            <h:panelGrid columns="2">
                #{cc.attrs.namePrompt}
                <h:inputText id="model" value="#{cc.attrs.managedBean.model}"/>
            </h:panelGrid>
            <span>
                <h:commandButton id="addButton"
                                 value="#{cc.attrs.addButtonText}"
                                 actionListener="#{cc.attrs.managedBean.addAirplane}"
                                 action="#{cc.attrs.managedBean.navigate}"/>
            </span>
        </h:form>
        <div class="error">
            <h:messages layout="table"/>
        </div>
    </composite:implementation>
</html>